<%@ page contentType="text/html; charset=UTF-8" session="false"%>
<%@ page import="cn.pconline.autoclub.entity.ClubAwardRecord" %>
<%@ include file="/WEB-INF/jspf/import.jspf"%>

<div class="pageHeader">
	<form onsubmit="return navTabSearch(this);" id="pagerForm" name="searchForm" method="get">
		<input type="hidden" name="pageNum" value="${pager.pageNo}" />
        <input type="hidden" name="pageSize" value="${pager.pageSize}" />
		<input type="hidden" name="orderField" value="${orderField}" />
    	<input type="hidden" name="orderDirection" value="${orderDirection}" />
		<div class="searchBar">
			<table class="searchContent">
				<tbody>
					<tr>
						<td><label>车友会名称：</label><input type="text" name="clubName" value="${param.clubName}" class="textInput"></td>
						<td><label>等级：</label><input type="text" name="levelName" value="${param.levelName}" class="textInput"></td>
						<td><label>升级时间：</label>
							<input type="text" name="begin" datefmt="yyyy-MM-dd 00:00:00" value="${param.begin}" class="date" readonly="true"> 至
							<input type="text" name="end" datefmt="yyyy-MM-dd 23:59:59" value="${param.end}" class="date" readonly="true">
						</td>
					</tr>
				</tbody>
			</table>
			<div class="subBar">
                <ul>
                    <li><div class="buttonActive"><div class="buttonContent"><button type="submit">查询</button></div></div></li>
                </ul>
            </div>
		</div>
	</form>
</div>
<div class="pageContent">
	<table class="table" style="width: 100%" layoutH="110">
		<thead>
			<tr>
				<th>车友会名称</th>
				<th orderField="level_id" class="${orderField=='level_id' ? orderDirection : ''}">等级</th>
				<th width="12%" orderField="update_time" class="${orderField=='update_time' ? orderDirection : ''}">升级时间</th>
				<th width="6%" orderField="received" class="${orderField=='received' ? orderDirection : ''}">奖品领取</th>
				<th>领取人姓名</th>
				<th width="20%">领取地址</th>
				<th>邮编</th>
				<th width="13%">联系方式</th>
				<th width="6%" orderField="status" class="${orderField=='status' ? orderDirection : ''}">发货状态</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach var="e" items="${pager.resultList}">
				<tr>
					<td>${e.clubName}</td>
					<td>${e.levelName}</td>
					<td><fmt:formatDate value="${e.updateTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
					<td>
						<c:if test="${e.received eq RECEIVED_NO}">未领取</c:if>
						<c:if test="${e.received eq RECEIVED_YES}">已领取</c:if>
					</td>
					<td>${e.name}</td>
					<td>${e.address}</td>
					<td>${e.postalCode}</td>
					<td>${e.phone}</td>
					<td>
						<c:if test="${e.status eq STATUS_NO}">
						<a  rel="award-record" target="ajaxTodo" style="color:blue;text-decoration:underline;" title="确定已发货?" href="${ROOT}/admin/club/updateStatus.do?id=${e.clubAwardRecordId}">未发货</a>
						</c:if>
						<c:if test="${e.status eq STATUS_YES}">已发货</c:if>
					</td>
				</tr>
			</c:forEach>
		</tbody>
	</table>
</div>
<div class="panelBar">
    <div class="pages">
        <span>共 ${pager.total} 条</span>
    </div>
    <div class="pagination" targetType="navTab" totalCount="${pager.total}" numPerPage="${pager.pageSize}" pageNumShown="10" currentPage="${pager.pageNo}"></div>
</div>
